fix(loc): correct reversed subject/object in zh-CN translation of TS2561#63435
Closed
creazyfrog wants to merge 1 commit intomicrosoft:mainfrom
Closed
fix(loc): correct reversed subject/object in zh-CN translation of TS2561#63435creazyfrog wants to merge 1 commit intomicrosoft:mainfrom
creazyfrog wants to merge 1 commit intomicrosoft:mainfrom
Conversation
The Simplified Chinese translation of error TS2561 had the subject and
object swapped: it read "type '{1}' does not exist in '{0}'" instead of
"'{0}' does not exist in type '{1}'", inverting the logical relationship
and misleading Chinese-speaking developers.
Three corrections applied:
- Restructure "但"{0}"中不存在类型"{1}"" → "但"{0}"在类型"{1}"中不存在"
(property does not exist in type, not type does not exist in property)
- Remove redundant 的: "已知的属性" → "已知属性"
- Improve closing phrase: "是否要写入 {2}?" → "您是否想写"{2}"?"
(add quotes around the suggestion, use natural phrasing)
Fixes microsoft#63274
Signed-off-by: creazyfrog <[email protected]>
Member
|
Unfortunately we're not able to take localization fixes externally - these files are sourced from our translation team and they don't have an upstream merging process |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this change intends to do
Fixes #63274
Corrects the Simplified Chinese (
zh-CN) translation of error TS2561, where the subject and object were swapped, causing the error message to read as the opposite of its intended meaning.The problem
Object literal may only specify known properties, but '{0}' does not exist in type '{1}'. Did you mean to write '{2}'?对象字面量只能指定已知的属性,但"{0}"中不存在类型"{1}"。是否要写入 {2}?对象字面量只能指定已知属性,但"{0}"在类型"{1}"中不存在。您是否想写"{2}"?The old text literally reads "but type '{1}' does not exist in '{0}'" — the complete opposite of the intended meaning. A Chinese-speaking developer reading this would think their type name is wrong, when actually their property name is wrong.
Changes in the fixed translation
但"{0}"中不存在类型"{1}"→但"{0}"在类型"{1}"中不存在(property{0}does not exist in type{1}, not the other way around)的:已知的属性→已知属性(more natural Chinese)是否要写入 {2}?→您是否想写"{2}"?(add quotes around the suggestion; more natural Chinese)File changed
src/loc/lcl/chs/diagnosticMessages/diagnosticMessages.generated.json.lcl— 1 line changedTests
This PR changes only a localization resource file (
.lcl). There are no TypeScript compiler tests for translation strings, so no test baselines are affected. The fix can be verified by runningtsc --locale zh-CNon a file that triggers TS2561 and confirming the error message now correctly reads that the property does not exist in the type.AI Assistance Disclosure
This PR was developed with the assistance of Claude Code (Anthropic), as required to be disclosed per the CONTRIBUTING.md guidelines.